package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbRapidMapper;
import com.bsb.base.model.BsbRapid;
import com.bsb.base.model.BsbRapidExample;
import com.bsb.base.model.Rapid;

@Service
public class BsbRapidService{
	
	@Resource
	private BsbRapidMapper bsbRapidMapper;
	
	public void addBsbRapid(BsbRapid bsbRapid) {
		bsbRapidMapper.insertSelective(bsbRapid);
	}
	
	public void delBsbRapidByUuid(String uuid) {
		bsbRapidMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateBsbRapid(BsbRapid bsbRapid) {
		bsbRapidMapper.updateByPrimaryKeySelective(bsbRapid);
	}
	
	public void updateBsbRapidByExample(BsbRapid bsbRapid,BsbRapidExample bsbRapidExample){
	    bsbRapidMapper.updateByExampleSelective(bsbRapid,bsbRapidExample);
	}
	
	public BsbRapid getBsbRapidByUuid(String uuid) {
		return bsbRapidMapper.selectByPrimaryKey(uuid);
	}
	
	public List<BsbRapid> getPageBsbRapid(BsbRapidExample bsbRapidExample) {
		return bsbRapidMapper.selectPage(bsbRapidExample);
	}
	
	public int countBsbRapid(BsbRapidExample bsbRapidExample) {
		return bsbRapidMapper.countByExample(bsbRapidExample);
	}
	
	public List<BsbRapid> selectByExample(BsbRapidExample example){
	    return bsbRapidMapper.selectByExample(example);
	}

	public int countRapid(String sql) {
		return bsbRapidMapper.countRapid(sql);
	}
	
	public List<Rapid> selectPageRapid(String sql){
		return bsbRapidMapper.selectPageRapid(sql);
	}
}
